﻿@model MyAnim.Models.FileModel
@{
    ViewBag.Title = "GetFile";
   
}
<script  type="text/javascript">
$(document).ready(StartTimer(5));
    
    function ChangeLabel() {
        
        $.ajax({
        url: "/Files/GetHttpLocation",
        data: {Name:"@Model.FileShortName" } ,
        success: function (Url) {
            document.getElementById("Link").href = Url;
            document.getElementById("Link").innerHTML = "Download";
        },
        type: "POST"
    });
     }
    function StartTimer(delai) {
        setTimeout("ChangeLabel()", delai * 1000);
    }

    

</script>
<h2></h2>
@using (Html.BeginForm())
{

    <div class="TopPub">
    Top
    </div>
    <div class="LeftPub">
    left
    </div>
    <div class="RightPub">
    right
    </div>
    <div class="GetFile-Link">
     <a id="Link" href="" target="_blank"></a>
    </div>  
    <br />
    <div class="BottomPub">
    bottom
    </div>
}

